using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db.Hr.Attendance;
using HengTong.Model.Db.Hr;


namespace HengTong.ViewModel.Hr.SysAttendanceRawRecordVms
{
    public partial class SysAttendanceRawRecordTemplateVm : BaseTemplateVM
    {
        public ExcelPropety PersonExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.PersonId);
        [Display(Name = "工号")]
        public ExcelPropety StaffNoExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.StaffNo);
        [Display(Name = "打卡时间")]
        public ExcelPropety PunchTimeExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.PunchTime);
        [Display(Name = "设备号")]
        public ExcelPropety DeviceIdExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.DeviceId);
        [Display(Name = "设备名称")]
        public ExcelPropety DeviceNameExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.DeviceName);
        [Display(Name = "打卡地点")]
        public ExcelPropety LocationExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.Location);
        [Display(Name = "经度")]
        public ExcelPropety LongitudeExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.Longitude);
        [Display(Name = "纬度")]
        public ExcelPropety LatitudeExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.Latitude);
        [Display(Name = "打卡类型")]
        public ExcelPropety PunchTypeExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.PunchType);
        [Display(Name = "识别方式")]
        public ExcelPropety RecognitionTypeExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.RecognitionType);
        [Display(Name = "原始数据")]
        public ExcelPropety RawDataExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.RawData);
        [Display(Name = "处理状态")]
        public ExcelPropety ProcessStatusExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.ProcessStatus);
        [Display(Name = "处理时间")]
        public ExcelPropety ProcessTimeExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.ProcessTime);
        [Display(Name = "备注")]
        public ExcelPropety RemarkExcel = ExcelPropety.CreateProperty<SysAttendanceRawRecord>(x => x.Remark);

	    protected override void InitVM()
        {
            PersonExcel.DataType = ColumnDataType.ComboBox;
            PersonExcel.ListItems = DC.Set<SysPerson>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysAttendanceRawRecordImportVm : BaseImportVM<SysAttendanceRawRecordTemplateVm, SysAttendanceRawRecord>
    {

    }

}
